![]() |
PBCreateForkSync |
||||
Header: | Files.h | Carbon status: | Supported | |
Creates a named fork for a file or directory.
OSErr PBCreateForkSync ( FSForkIOParam *paramBlock );
A pointer to a parameter block.
A result code.
The relevant fields of the parameter block are:
On input, a pointer to a completion routine.
On output, the result code of the function. If the named fork already exists, errFSForkExists is returned. If the fork name is syntactically invalid or otherwise unsupported for the given volume, errFSBadForkName or errFSNameTooLong is returned.
On input, the file or directory
On input, the length of the fork name in Unicode characters. A newly created fork has zero length (i.e. its logical end-of-file is zero).
On input, the Unicode name of the fork to open.
The data and resource forks of a file are automatically created and deleted as needed (for compatibility with older APIs, and because they’re often handled specially). If a given fork always exists for a given volume format (such as data and resource forks for HFS and HFS Plus, or data forks for most other volume formats), an attempt to create that fork when a zero-length fork already exists should return noErr; if a non-empty fork already exists then errFSForkExists should be returned.
Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)